package model.command;

import controller.KeyListeners.KeyListenerSet;
import model.map.Direction;
import model.playable.Playable;
/**
 *
 * @author joseph
 */
public class Defend extends Combat{
    public Defend(Playable playable){
        super(playable);
    }
    /**
     *
     */
    @Override
    public void attachToListener() {
        getListeners().attachToDirectionListener(clone());
    }
    /**
     *
     * @return
     */
    @Override
    public Defend clone() {
        return new Defend(getPlayable());
    }
    /**
     *
     */
    @Override
    public void executeCommand() {
        ((Combatable)getPlayable()).defend(getDirection());
    }
    /**
     * 
     * 
     * @return
     */
    @Override
    public String toString(){
        return "Defend";
    }
}
